/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include "向量.h"


/*#include "chrono/core/ChRealtimeStep.h"
#include "chrono/physics/ChBodyEasy.h"
#include "chrono/physics/ChLinkDistance.h"
#include "chrono/physics/ChLinkMotorRotationTorque.h"
#include "chrono/physics/ChSystemNSC.h"*/

#include "../../../S_Physics.h"

#include "Bullet核心.h"
//#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolverMt.h"

#include "BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h"
#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"






struct S_Bulle平面 : public S_物理几何体 {
	btCollisionShape* m_Shape;

	S_Bulle平面(const vec4& plane);
	~S_Bulle平面();

	void* f_get几何体物理对象() { return m_Shape; }
	bool	f_is空() {
		return false;
	};
};






struct S_Bullet球体几何体 : public S_物理几何体 {
	btCollisionShape* m_Shape;
	float32	m_重量;

	void* f_get几何体物理对象() { return m_Shape; }
	//void	f_set几何体物理数据(void* data);
	bool	f_is空() {
		return false;
		//if (m_plane.distance(m_plane.n) <= 0) return true;
		//else return false;
	};
	S_Bullet球体几何体(const float32 半径);

	void	f_set质量(float32 v);
};








struct S_Bullet长方体几何体 : public S_物理几何体 {
	btCollisionShape* m_Shape;
	float32	m_重量;

	void*	f_get几何体物理对象() { return m_Shape; }
	//void	f_set几何体物理数据(void* data);
	bool	f_is空() {
		return false;
		//if (m_plane.distance(m_plane.n) <= 0) return true;
		//else return false;
	};
	S_Bullet长方体几何体(const vec3& ckg);

	void	f_set质量(float32 v);
};








struct S_Bullet圆柱几何体 : public S_物理几何体 {
	vec3				m_长宽高;
	float32				m_重量;
	btCollisionShape*	m_Shape;

	void* f_get几何体物理对象() { return m_Shape; }
	//void	f_set几何体物理数据(void* data);
	bool	f_is空() {
		return false;
		//if (m_plane.distance(m_plane.n) <= 0) return true;
		//else return false;
	};
	S_Bullet圆柱几何体(const vec3& ckg, float32 密度 = 1.0);

	void	f_set质量(float32 v);
};






struct S_Bullet凸包几何体 : public S_物理几何体 {
	float32	m_重量;
	//std::vector<chrono::ChVector<>> m_Points;
	btCollisionShape* m_Shape;

	void*	f_get几何体物理对象() { return m_Shape; }
	//void	f_set几何体物理数据(void* data);
	bool	f_is空() {
		return false;
		//if (m_plane.distance(m_plane.n) <= 0) return true;
		//else return false;
	};
	S_Bullet凸包几何体(const S_三角Mesh& v);

	void	f_set质量(float32 v);
};









struct S_Bullet网格几何体 : public S_物理几何体 {
	float32	m_重量;
	//std::vector<chrono::ChVector<>> m_Points;
	btCollisionShape* m_Shape;

	void* f_get几何体物理对象() { return m_Shape; }
	//void	f_set几何体物理数据(void* data);
	bool	f_is空() {
		return false;
		//if (m_plane.distance(m_plane.n) <= 0) return true;
		//else return false;
	};
	S_Bullet网格几何体(const S_三角Mesh& v);

	void	f_set质量(float32 v);
};










